import fetch from '@/utils/network/fetch'

const getDocuments = (objc) => {
    fetch('/api/knowledge/document', objc)
}

const removeDocument = (objc) => {
    fetch('/api/knowledge/document/deletion', objc)
}

const editDocument = (objc) => {
    fetch(`/api/knowledge/document/${objc.data.id}`, objc)
}

const addDocument = (objc) => {
    fetch('/api/knowledge/document', objc)
}

const getClassDocument = (objc) => {
    fetch(`/api/classification?class_type=${objc.data.class_type}&build_tree=true`, objc)   
}

export default {
    getDocuments,
    removeDocument,
    editDocument,
    addDocument,
    getClassDocument
}